import requests


headers = {
    "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
    "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,ar;q=0.7",
    "cache-control": "no-cache",
    "pragma": "no-cache",
    "priority": "u=0, i",
    "referer": "https://www.vjshi.com/so/shipinsucai.html?page=3",
    "sec-ch-ua": "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Microsoft Edge\";v=\"138\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "document",
    "sec-fetch-mode": "navigate",
    "sec-fetch-site": "same-origin",
    "sec-fetch-user": "?1",
    "upgrade-insecure-requests": "1",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0"
}
cookies = {
    "acw_tc": "0e1d3f9a17543644576132016e9a878f475a14050dd9c261f85ce5e725",
    "cdn_sec_tc": "0e1d3f9a17543644576132016e9a878f475a14050dd9c261f85ce5e725",
    "acw_sc__v2": "68917a29809fc88d29174db638a91e5363788dfb",
    "browserId": "9368bd04e5201e086d27e502b11a5c49",
    "Hm_lvt_d50ee9203a35be45d6b0a9db1948f94e": "1754364458",
    "HMACCOUNT": "628427A3BD9CB08E",
    "Hm_up_d50ee9203a35be45d6b0a9db1948f94e": "%7B%22use_new_ui%22%3A%7B%22value%22%3A%221%22%2C%22scope%22%3A1%7D%7D",
    "_ga": "GA1.1.331606996.1754364459",
    "Hm_lpvt_d50ee9203a35be45d6b0a9db1948f94e": "1754366267",
    "_ga_X670GRBYKT": "GS2.1.s1754364458$o1$g1$t1754366268$j57$l0$h0"
}
url = "https://www.vjshi.com/watch/29472757.html"
params = {
    "direct": "true",
    "from": "search"
}
response = requests.get(url, headers=headers, cookies=cookies, params=params)

print(response.text)
print(response)
with open("29472757.html", "w", encoding="utf-8") as f:
    f.write(response.text)